#include <QApplication>
#include <QMainWindow>
#include <QHBoxLayout>
#include <QLabel>

#include "ResponsiveSplitter.h"

int main(int argc, char *argv[]) {
    QApplication a(argc, argv);

    QMainWindow mainWindow;
    mainWindow.setWindowTitle("TKMQTT");
    mainWindow.resize(800, 600);

    QWidget *centralWidget = new QWidget(&mainWindow);
    QHBoxLayout *mainLayout = new QHBoxLayout(centralWidget);
    mainLayout->setContentsMargins(0, 0, 0, 0);

    ResponsiveSplitter *splitter = new ResponsiveSplitter(Qt::Vertical, centralWidget);
    mainLayout->addWidget(splitter);

    QLabel *leftLabel = new QLabel("left-label", splitter->widget(0));
    leftLabel->setAlignment(Qt::AlignCenter);
    QVBoxLayout *leftLayout = new QVBoxLayout(splitter->widget(0));
    leftLayout->addWidget(leftLabel);

    QLabel *rightLabel = new QLabel("left-label", splitter->widget(1));
    rightLabel->setAlignment(Qt::AlignCenter);
    QVBoxLayout *rightLayout = new QVBoxLayout(splitter->widget(1));
    rightLayout->addWidget(rightLabel);

    mainWindow.setCentralWidget(centralWidget);
    mainWindow.show();
    return QApplication::exec();
}
